package com.haina.vote.service.impl;

import com.haina.vote.entity.Project;
import com.haina.vote.mapper.SpiderMapper;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class SpiderService {
    @Autowired
    private SpiderMapper spiderMapper;

    public List<Project> findAll(Project project){
        project.setDataSource("自然科学基金申报指南");
        List<Project> projectList = spiderMapper.findAll(project);

        return projectList;
    }

    public void updateProject(Project project_update) {
        spiderMapper.updateProject(project_update);
    }
}
